	function startCourse()

	

{



	// check to see if cookies is enabled, otherwise, this won't work

	if( typeof sessionStorage === "undefined" || sessionStorage.disabled )

	{

		alert( "You must enable cookies for this course to work properly." );

	}

	else

	{

		// if it is enabled, checked to see if this course was started

		// if it was not able to retrieve, the key "course_started", then

		// then this is the first time we are running the course

        if( !sessionStorage.getItem( "course_started" ) )

        {

        	// clear the session storage

            sessionStorage.clear();

            // set the "key" by giving it a value.  all values are strings!

    		sessionStorage.setItem( "course_started", "1" );

    		sessionStorage.setItem( "UAE", "0" );

    		sessionStorage.setItem( "Sudan", "0" );

    		sessionStorage.setItem( "Finland", "0" );

    		sessionStorage.setItem( "Botswana", "0" );

        }

	}

}

function visitUAE()

{

sessionStorage.setItem( "UAE", "visited" );



showTest();

 

}

function visitSudan()

{

sessionStorage.setItem( "sudan", "visited" );



showTest();

 

}





function visitFinland()

{

sessionStorage.setItem( "finland", "visited" );

showTest();

}



function visitBotswana()

{

sessionStorage.setItem( "botswana", "visited" );



showTest();

}

//this function will check to see if every page was visited

// if so, show the Test link



function showTest()

{



var UAEVisited = sessionStorage.getItem( "UAE" );



var sudanVisited = sessionStorage.getItem( "sudan" );



var finlandVisited = sessionStorage.getItem( "finland" );


var botswanaVisited = sessionStorage.getItem( "botswana" );
	

	

	if( UAEVisited = "visited" && sudanVisited == "visited" && finlandVisited == "visited" && botswanaVisited == "visited" )

	

	{

	document.getElementById( "test-link" ).style.display = "inline";

	

	}



}





function submitQuiz1()
{
	
	
	var numberCorrect = 0;
	
	var q1 = document.forms.quiz1.question1;

	if( q1[ 1 ].checked == true ) 
	{
		numberCorrect = numberCorrect + 1;
	}
	
	var q2 = document.forms.quiz1.question2;
	
	if( q2[ 2 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}

	var q3 = document.forms.quiz1.question3;
	
	if( q3[ 2 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}
	
	var q4 = document.forms.quiz1.question4;
	
	if( q4[ 2 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}

    var q5 = document.forms.quiz1.question5;
	
	if( q5[ 0 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}
	var q6 = document.forms.quiz1.question6;
	
	if( q6[ 1 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}
	var score = numberCorrect / 6 * 100;
	alert( "Your score is " + score );
	
}